package com.liusu.spider.wuzhou;

import java.util.Arrays;

public class Print {

    public void print(Object content){
        System.out.println(content);
    }

    public void print(String content){
        if(content == null){
            System.out.println(content);
            return;
        }
        if(content.equals("")){
            System.out.println("''");
            return;
        }
        System.out.println(content);
    }

    public void print(Object[] array){

        System.out.println(Arrays.toString(array));
    }
    public void print(char[] array){

        System.out.println(Arrays.toString(array));
    }
    public void print(byte[] array){

        System.out.println(Arrays.toString(array));
    }
    public void print(short[] array){

        System.out.println(Arrays.toString(array));
    }
    public void print(int[] array){

        System.out.println(Arrays.toString(array));
    }
    public void print(long[] array){

        System.out.println(Arrays.toString(array));
    }
    public void print(boolean[] array){

        System.out.println(Arrays.toString(array));
    }
    public String f(String content,Object ...list){
        if(list==null||list.length ==0 ){
            return content;
        }
        for (int i = 0; i < list.length; i++) {
            content = content.replace("{"+i+"}",list[i].toString());
        }
        return content;
    }
    public void print(String content,Object ...list){

        System.out.println(f(content,list));
    }
}
